package br.com.ceped.bean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.event.NamedEvent;
import javax.faces.event.ValueChangeEvent;



@NamedEvent
@ManagedBean(name = "teste")
@SessionScoped
public class testebean {

	private int id;
	
	public int getId() {
		return id;
	}
	public testebean() {
	}

	public void setId(int id) {
		this.id = id;
	}
	
    public String imprimir(){
        if(id<=3){
    	id=id+1; 
        System.out.println(id);
        System.out.println("aqui");
        }
        return null;
    	}
    
    public String diminuir(){
        if(id>=1){
    	id=id-1; 
        System.out.println(id);
        System.out.println("aqui");
        }
        return null;
    	}

	public void metodoValueChangeListener(ValueChangeEvent e) {
		e.getNewValue();
		
	}
	
	
}
